import request from '@/utils/request';

export function login(data) {
  return request({
    url: '/admin/manager/login',
    method: 'post',
    data
  });
}

export function getInfo(token) {
  return request({
    url: '/admin/manager/user/info',
    method: 'post',
    params: { token }
  });
}

export function logout(token) {
  return request({
    url: '/admin/manager/logout',
    method: 'post',
    params: { token }
  });
}

// 用户管理
export function apiVerifyUserList(data) {
  return request({
    url: '/admin/verify-user/list',
    method: 'post',
    data
  });
}

export function apiVerifyUserDel(data) {
  return request({
    url: '/admin/verify-user/del',
    method: 'post',
    data
  });
}

export function apiVerifyUserAdd(data) {
  return request({
    url: '/admin/verify-user/add',
    method: 'post',
    data
  });
}

export function apiVerifyUserEdit(data) {
  return request({
    url: '/admin/verify-user/edit',
    method: 'post',
    data
  });
}

export function apiUserList(data) {
  return request({
    url: '/admin/users/list',
    method: 'post',
    data
  });
}

export function apiSetUsersDo(data) {
  return request({
    url: '/admin/users/setUsers/do',
    method: 'post',
    data
  });
}

export function apiOrderList(data) {
  return request({
    url: '/admin/order/list',
    method: 'post',
    data
  });
}
